const orderService = require('../../service/orderService');
const orderRouter = {
    prefix: '/order',
    routers: [{
            method: 'post',
            handler: orderService.create
        },
        {
            method: 'put',
            handler: orderService.update
        },
        {
            method: 'get',
            url: '/findById',
            handler: orderService.findById
        },{
            method: 'get',
            url: '/findByUserId',
            handler: orderService.findByUserId
        }, {
            method: 'get',
            url: '/findByMerchantId',
            handler: orderService.findByMerchantId
        }, {
            method: 'put',
            url: '/operation',
            handler: orderService.operation
        }, {
            method: 'get',
            url: '/findCountByMerchantId',
            handler: orderService.findCountByMerchantId
        }, {
            method: 'get',
            url: '/findTodyByMerchantId',
            handler: orderService.findTodyByMerchantId
        }
    ]
}

module.exports = orderRouter;